Linux All-In-One For Dummies (For Dummies (ComputerTech)) by Emmett Dulaney

Linux All-In-One For Dummies (For Dummies (ComputerTech)) by Emmett Dulaney
Author: Emmett Dulaney [Dulaney, Emmett]
Language: eng
Format: azw3
ISBN: 9781119490524
Publisher: Wiley
Published: 2018-06-14

Zone-file formats


The zone file typically starts with directives, each of which begins with a dollar sign ($) followed by a keyword. Two commonly used directives are $TTL and $ORIGIN.

The line

$TTL 86400

uses the $TTL directive to set the default time to live (TTL) for subsequent records with undefined TTLs. The value is in seconds, and the valid TTLs are in the range 0 to 2147483647 seconds. In this case, the directive sets the default TTL as 86400 seconds (or one day).

The $ORIGIN directive sets the domain name that’s appended to any unqualified records. The following $ORIGIN directive sets the domain name to localhost:

$ORIGIN localhost.

If no $ORIGIN directive exists, the initial $ORIGIN is the same as the zone name that comes after the zone keyword in the /etc/named.conf file.

After the directives, the zone file contains one or more RRs. These records follow a specific format, which are outlined in the next section.